package com.google.gdata.data.douban;

import com.google.gdata.data.BaseEntry;
import com.google.gdata.data.ExtensionDescription;
import com.google.gdata.data.ExtensionProfile;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: huangzhongkun
 * Date: 11-5-30
 * Time: 下午4:30
 */
@ExtensionDescription.Default(
		nsAlias = "",
		nsUri = "http://www.w3.org/2005/Atom",
		localName = "entry")
public class RecommendEntry extends BaseEntry<RecommendEntry>{
    public RecommendEntry(){
        super();
    }

    public RecommendEntry(BaseEntry souceEntry){
        super(souceEntry);
    }

    @Override
    public void declareExtensions(ExtensionProfile extProfile) {
        super.declareExtensions(extProfile);

        extProfile.declare(MiniblogEntry.class, Attribute.class);
        extProfile.declareArbitraryXmlExtension(RecommendEntry.class);

    }

    protected List<Attribute> attributes;

    public List<Attribute> getAttributes() {
        return getRepeatingExtension(Attribute.class);
    }
    public void setAttributes(Attribute att) {
        if (att == null) {
            removeExtension(Attribute.class);
        } else {
                 addRepeatingExtension(att);
        }
    }

}
